Optimal. Leaf size=160 \[ \frac {10 a^6 x}{c^4}-\frac {10 i a^6 \log (\cos (e+f x))}{c^4 f}-\frac {a^6 \tan (e+f x)}{c^4 f}-\frac {8 i a^6}{f (c-i c \tan (e+f x))^4}+\frac {80 i a^6}{3 c f (c-i c \tan (e+f x))^3}-\frac {40 i a^6}{f \left (c^2-i c^2 \tan (e+f x)\right )^2}+\frac {40 i a^6}{f \left (c^4-i c^4 \tan (e+f x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 160, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3603, 3568, 45}
\begin {gather*} -\frac {a^6 \tan (e+f x)}{c^4 f}+\frac {40 i a^6}{f \left (c^4-i c^4 \tan (e+f x)\right )}-\frac {10 i a^6 \log (\cos (e+f x))}{c^4 f}+\frac {10 a^6 x}{c^4}-\frac {40 i a^6}{f \left (c^2-i c^2 \tan (e+f x)\right )^2}+\frac {80 i a^6}{3 c f (c-i c \tan (e+f x))^3}-\frac {8 i a^6}{f (c-i c \tan (e+f x))^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 3568
Rule 3603
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^6}{(c-i c \tan (e+f x))^4} \, dx &=\left (a^6 c^6\right ) \int \frac {\sec ^{12}(e+f x)}{(c-i c \tan (e+f x))^{10}} \, dx\\ &=\frac {\left (i a^6\right ) \text {Subst}\left (\int \frac {(c-x)^5}{(c+x)^5} \, dx,x,-i c \tan (e+f x)\right )}{c^5 f}\\ &=\frac {\left (i a^6\right ) \text {Subst}\left (\int \left (-1+\frac {32 c^5}{(c+x)^5}-\frac {80 c^4}{(c+x)^4}+\frac {80 c^3}{(c+x)^3}-\frac {40 c^2}{(c+x)^2}+\frac {10 c}{c+x}\right ) \, dx,x,-i c \tan (e+f x)\right )}{c^5 f}\\ &=\frac {10 a^6 x}{c^4}-\frac {10 i a^6 \log (\cos (e+f x))}{c^4 f}-\frac {a^6 \tan (e+f x)}{c^4 f}-\frac {8 i a^6}{f (c-i c \tan (e+f x))^4}+\frac {80 i a^6}{3 c f (c-i c \tan (e+f x))^3}-\frac {40 i a^6}{f \left (c^2-i c^2 \tan (e+f x)\right )^2}+\frac {40 i a^6}{f \left (c^4-i c^4 \tan (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(455\) vs. \(2(160)=320\).
time = 3.86, size = 455, normalized size = 2.84 \begin {gather*} \frac {a^6 \sec (e) \sec (e+f x) (\cos (4 (e+f x))+i \sin (4 (e+f x))) \left (20 i \cos (f x)+20 i \cos (2 e+f x)+53 i \cos (2 e+3 f x)+60 f x \cos (2 e+3 f x)+65 i \cos (4 e+3 f x)+60 f x \cos (4 e+3 f x)-15 i \cos (4 e+5 f x)+60 f x \cos (4 e+5 f x)-3 i \cos (6 e+5 f x)+60 f x \cos (6 e+5 f x)-30 i \cos (2 e+3 f x) \log \left (\cos ^2(e+f x)\right )-30 i \cos (4 e+3 f x) \log \left (\cos ^2(e+f x)\right )-30 i \cos (4 e+5 f x) \log \left (\cos ^2(e+f x)\right )-30 i \cos (6 e+5 f x) \log \left (\cos ^2(e+f x)\right )+40 \sin (f x)+40 \sin (2 e+f x)+43 \sin (2 e+3 f x)-60 i f x \sin (2 e+3 f x)-30 \log \left (\cos ^2(e+f x)\right ) \sin (2 e+3 f x)+55 \sin (4 e+3 f x)-60 i f x \sin (4 e+3 f x)-30 \log \left (\cos ^2(e+f x)\right ) \sin (4 e+3 f x)-9 \sin (4 e+5 f x)-60 i f x \sin (4 e+5 f x)-30 \log \left (\cos ^2(e+f x)\right ) \sin (4 e+5 f x)+3 \sin (6 e+5 f x)-60 i f x \sin (6 e+5 f x)-30 \log \left (\cos ^2(e+f x)\right ) \sin (6 e+5 f x)\right )}{24 c^4 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.29, size = 87, normalized size = 0.54
method | result | size |
derivativedivides | \(\frac {a^{6} \left (-\tan \left (f x +e \right )-\frac {8 i}{\left (\tan \left (f x +e \right )+i\right )^{4}}+\frac {40 i}{\left (\tan \left (f x +e \right )+i\right )^{2}}+\frac {80}{3 \left (\tan \left (f x +e \right )+i\right )^{3}}-\frac {40}{\tan \left (f x +e \right )+i}+10 i \ln \left (\tan \left (f x +e \right )+i\right )\right )}{f \,c^{4}}\) | \(87\) |
default | \(\frac {a^{6} \left (-\tan \left (f x +e \right )-\frac {8 i}{\left (\tan \left (f x +e \right )+i\right )^{4}}+\frac {40 i}{\left (\tan \left (f x +e \right )+i\right )^{2}}+\frac {80}{3 \left (\tan \left (f x +e \right )+i\right )^{3}}-\frac {40}{\tan \left (f x +e \right )+i}+10 i \ln \left (\tan \left (f x +e \right )+i\right )\right )}{f \,c^{4}}\) | \(87\) |
risch | \(-\frac {i a^{6} {\mathrm e}^{8 i \left (f x +e \right )}}{2 c^{4} f}+\frac {4 i a^{6} {\mathrm e}^{6 i \left (f x +e \right )}}{3 c^{4} f}-\frac {3 i a^{6} {\mathrm e}^{4 i \left (f x +e \right )}}{c^{4} f}+\frac {8 i a^{6} {\mathrm e}^{2 i \left (f x +e \right )}}{c^{4} f}-\frac {20 a^{6} e}{f \,c^{4}}-\frac {2 i a^{6}}{f \,c^{4} \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}-\frac {10 i a^{6} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{f \,c^{4}}\) | \(147\) |
norman | \(\frac {\frac {10 a^{6} x}{c}+\frac {56 i a^{6}}{3 c f}+\frac {40 a^{6} x \left (\tan ^{2}\left (f x +e \right )\right )}{c}+\frac {60 a^{6} x \left (\tan ^{4}\left (f x +e \right )\right )}{c}+\frac {40 a^{6} x \left (\tan ^{6}\left (f x +e \right )\right )}{c}+\frac {10 a^{6} x \left (\tan ^{8}\left (f x +e \right )\right )}{c}-\frac {9 a^{6} \tan \left (f x +e \right )}{c f}-\frac {148 a^{6} \left (\tan ^{3}\left (f x +e \right )\right )}{3 c f}-\frac {58 a^{6} \left (\tan ^{5}\left (f x +e \right )\right )}{3 c f}-\frac {44 a^{6} \left (\tan ^{7}\left (f x +e \right )\right )}{c f}-\frac {a^{6} \left (\tan ^{9}\left (f x +e \right )\right )}{c f}+\frac {72 i a^{6} \left (\tan ^{4}\left (f x +e \right )\right )}{c f}+\frac {80 i a^{6} \left (\tan ^{6}\left (f x +e \right )\right )}{c f}+\frac {224 i a^{6} \left (\tan ^{2}\left (f x +e \right )\right )}{3 c f}}{\left (1+\tan ^{2}\left (f x +e \right )\right )^{4} c^{3}}+\frac {5 i a^{6} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{c^{4} f}\) | \(284\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.15, size = 142, normalized size = 0.89 \begin {gather*} \frac {-3 i \, a^{6} e^{\left (10 i \, f x + 10 i \, e\right )} + 5 i \, a^{6} e^{\left (8 i \, f x + 8 i \, e\right )} - 10 i \, a^{6} e^{\left (6 i \, f x + 6 i \, e\right )} + 30 i \, a^{6} e^{\left (4 i \, f x + 4 i \, e\right )} + 48 i \, a^{6} e^{\left (2 i \, f x + 2 i \, e\right )} - 12 i \, a^{6} - 60 \, {\left (i \, a^{6} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, a^{6}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{6 \, {\left (c^{4} f e^{\left (2 i \, f x + 2 i \, e\right )} + c^{4} f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.53, size = 243, normalized size = 1.52 \begin {gather*} - \frac {2 i a^{6}}{c^{4} f e^{2 i e} e^{2 i f x} + c^{4} f} - \frac {10 i a^{6} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{c^{4} f} + \begin {cases} \frac {- 3 i a^{6} c^{12} f^{3} e^{8 i e} e^{8 i f x} + 8 i a^{6} c^{12} f^{3} e^{6 i e} e^{6 i f x} - 18 i a^{6} c^{12} f^{3} e^{4 i e} e^{4 i f x} + 48 i a^{6} c^{12} f^{3} e^{2 i e} e^{2 i f x}}{6 c^{16} f^{4}} & \text {for}\: c^{16} f^{4} \neq 0 \\\frac {x \left (4 a^{6} e^{8 i e} - 8 a^{6} e^{6 i e} + 12 a^{6} e^{4 i e} - 16 a^{6} e^{2 i e}\right )}{c^{4}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.25, size = 285, normalized size = 1.78 \begin {gather*} -\frac {\frac {420 i \, a^{6} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{c^{4}} - \frac {840 i \, a^{6} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}{c^{4}} + \frac {420 i \, a^{6} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{c^{4}} - \frac {84 \, {\left (5 i \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 5 i \, a^{6}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )} c^{4}} + \frac {2283 i \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} - 18936 \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 69300 i \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 141512 \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 183106 i \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 141512 \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 69300 i \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 18936 \, a^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2283 i \, a^{6}}{c^{4} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{8}}}{42 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.95, size = 170, normalized size = 1.06 \begin {gather*} \frac {a^6\,\left (10\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )-60\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^2+10\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^4-76\,{\mathrm {tan}\left (e+f\,x\right )}^2-4\,{\mathrm {tan}\left (e+f\,x\right )}^4+\frac {56}{3}-\frac {\mathrm {tan}\left (e+f\,x\right )\,197{}\mathrm {i}}{3}-\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,\mathrm {tan}\left (e+f\,x\right )\,40{}\mathrm {i}+\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^3\,40{}\mathrm {i}+{\mathrm {tan}\left (e+f\,x\right )}^3\,34{}\mathrm {i}+{\mathrm {tan}\left (e+f\,x\right )}^5\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{c^4\,f\,{\left (-1+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________